home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Source Code
/
Visual Basic Source Code.iso
/
vbsource
/
howtod2r
/
frmsited.frm
(
.txt
)
< prev
next >
Wrap
Visual Basic Form
|
1999-01-17
|
10KB
|
323 lines
VERSION 5.00
Begin VB.Form frmSiteDefinition
BorderStyle = 1 'Fixed Single
Caption = "Site Definition"
ClientHeight = 6510
ClientLeft = 45
ClientTop = 330
ClientWidth = 8910
Icon = "frmSiteDefinition.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 6510
ScaleWidth = 8910
Begin VB.Frame fraRootDefinitions
Caption = "Root Definition"
Height = 1215
Left = 5400
TabIndex = 11
Top = 5040
Width = 3375
Begin VB.TextBox txtRoot
Enabled = 0 'False
Height = 285
Left = 1320
TabIndex = 14
Top = 360
Width = 1815
End
Begin VB.OptionButton optDivined
Caption = "Divined"
Height = 375
Left = 240
TabIndex = 13
Top = 720
Value = -1 'True
Width = 975
End
Begin VB.OptionButton optDefine
Caption = "Supplied"
Height = 255
Left = 240
TabIndex = 12
Top = 360
Width = 975
End
End
Begin VB.Frame fraOperations
Caption = "Operations"
Height = 1215
Left = 240
TabIndex = 5
Top = 5040
Width = 4575
Begin VB.CommandButton cmdMapIt
Caption = "Map it!"
Height = 615
Left = 3120
TabIndex = 10
Top = 360
Width = 1215
End
Begin VB.CommandButton cmdBuildList
Caption = "Build File List"
Height = 615
Left = 1680
TabIndex = 7
Top = 360
Width = 1215
End
Begin VB.CommandButton cmdChoose
Caption = "Choose Directory"
Height = 615
Left = 240
TabIndex = 6
Top = 360
Width = 1215
End
End
Begin VB.Frame fraDirDefinition
Caption = "Directory Definition"
Height = 4095
Left = 240
TabIndex = 0
Top = 720
Width = 8535
Begin VB.CommandButton cmdMasks
Caption = "Define Masks"
Height = 255
Left = 5280
TabIndex = 17
Top = 960
Width = 1335
End
Begin VB.ListBox lstFiles
Height = 2010
Left = 240
Sorted = -1 'True
TabIndex = 8
Top = 1800
Width = 8055
End
Begin VB.Label lbllFiles
Caption = "Files:"
Height = 255
Left = 120
TabIndex = 9
Top = 1440
Width = 975
End
Begin VB.Label lblFileMasks
Height = 375
Left = 1560
TabIndex = 4
Top = 960
Width = 5415
End
Begin VB.Label lbllFileMasks
Caption = "File Masks:"
Height = 255
Left = 120
TabIndex = 3
Top = 960
Width = 1215
End
Begin VB.Label lblDirectory
Height = 375
Left = 1560
TabIndex = 2
Top = 360
Width = 6735
End
Begin VB.Label lbllMainDirectory
Caption = "Main Directory:"
Height = 255
Left = 120
TabIndex = 1
Top = 360
Width = 1215
End
End
Begin VB.Label lblSiteName
Height = 255
Left = 1440
TabIndex = 16
Top = 240
Width = 5055
End
Begin VB.Label lbllSite
Caption = "Site Name:"
Height = 255
Left = 360
TabIndex = 15
Top = 240
Width = 855
End
Attribute VB_Name = "frmSiteDefinition"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'frmSiteDefinition.frm
'--------------------------------------------------------------------------
'<Purpose>
'<Revision>
' $Revision: $
'<Mod Log>
' $Log: $
'--------------------------------------------------------------------------
Public mSiteID As String
Public mWasLoaded As Boolean
Private Sub cmdBuildList_Click()
'--------------------------------------------------------------------------
'<Purpose>
'<Syntax>
'<Assumptions>
'<Returns>
'<Author>
' HBW
'--------------------------------------------------------------------------
Dim i As Integer
Dim strName As String
strName = InputBox("Site Name?", "Define site")
lblSiteName = strName
Me.Caption = Me.Caption & " - " & strName
gSites(mSiteID).SiteName = strName
frmMain.sbMain.SimpleText = "Finding files...please wait."
Screen.MousePointer = vbHourglass
gSites(mSiteID).FileCount = 0
lstFiles.Clear
For i = 1 To gSites(mSiteID).FilterCount
Call FindFiles(False, gSites(mSiteID).MainDirectory, gSites(mSiteID).FilterEntry(i), mSiteID)
Next
For i = 1 To gSites(mSiteID).FileCount
lstFiles.AddItem gSites(mSiteID).FileEntry(i)
Next
Screen.MousePointer = vbNormal
frmMain.sbMain.SimpleText = ""
End Sub
'--------------------------------------------------------------------------
'<Purpose>
'<Syntax>
'<Assumptions>
'<Returns>
'<Author>
' HBW
'--------------------------------------------------------------------------
Private Sub cmdChoose_Click()
Load frmChooseDirectory
If Len(gSites(mSiteID).MainDirectory) > 0 Then
frmChooseDirectory.CurrentDirectory = gSites(mSiteID).MainDirectory
lblDirectory = gSites(mSiteID).MainDirectory
End If
frmChooseDirectory.Show vbModal
If gSites(mSiteID).MainDirectory <> frmChooseDirectory.CurrentDirectory Then
gSites(mSiteID).MainDirectory = frmChooseDirectory.CurrentDirectory
lblDirectory = gSites(mSiteID).MainDirectory
End If
Unload frmChooseDirectory
End Sub
'--------------------------------------------------------------------------
'<Purpose>
'<Syntax>
'<Assumptions>
'<Returns>
'<Author>
' HBW
'--------------------------------------------------------------------------
Private Sub cmdMapIt_Click()
If optDefine.Value = True And Len(txtRoot) = 0 Then
MsgBox "Missing supplied value for root."
txtRoot.SetFocus
Exit Sub
End If
Screen.MousePointer = vbHourglass
Call MapMe(mSiteID)
Screen.MousePointer = vbNormal
frmMain.sbMain.SimpleText = ""
End Sub
Private Sub cmdMasks_Click()
Dim frm As New frmPickFilter
Dim i As Integer
Dim st As Site
For i = 1 To gSites(mSiteID).FilterCount
frm.lstFilters.AddItem gSites(mSiteID).FilterEntry(i)
Next
Set frm.mSite = gSites(mSiteID)
frm.Show vbModal
Set st = gSites(mSiteID)
lblFileMasks = ""
For i = 1 To st.FilterCount
lblFileMasks = lblFileMasks & st.FilterEntry(i) & " "
Next
End Sub
'--------------------------------------------------------------------------
'<Purpose>
'<Syntax>
'<Assumptions>
'<Returns>
'<Author>
' HBW
'-------------------------